using Serpis;
using System;

namespace PVenta
{
	[Label("Categorias")]
	public class CategoriaListView : EntityListView
	{
		private string selectSql = "select c.Id as Id, c.Nombre as Nombre from Categoria c";
		
		public CategoriaListView () : base(typeof(Categoria), typeof(CategoriaView))
		{
			label.LabelProp= "Nombre de la categoria";
			entry.Text= selectSql;
			
			init();
		}
		
		protected override string getSql() {
			return string.Format(selectSql, entry.Text);
		}
	}
}